﻿
@{
    ViewBag.Title = "装车详情";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
@model IOA.MES.DataAccess.VModel.VLoadInspect


<div id="page"></div>

<script type="text/template" id="tplPage">
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                发货单号：@Model.DeliveryNo，柜号：@Model.CabinetNo，操作人：@Model.CNLoadBy
            </div>
            <div class="layui-card-body">
                <table id="table" lay-filter="table"></table>
            </div>
        </div>
    </div>
</script>

@section Scripts{
    <script>
        var vm = new Vue({
            el: "#page",
            template: "#tplPage",
            data: {
                lang: JSON.parse(lang).package,
                packs: @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.Packs))
            }
        });

        setTimeout(function () {
            initLayui();
        }, 50);

        function initLayui() {
            layui.use(['table', 'layer', 'laydate', 'form'], function () {
                var table = layui.table;

                var options = {
                    elem: '#table'
                    , data: vm.$data.packs
                    , cols: [[
                        { title: '序号', type: "numbers", width: 100 }
                        , { field: 'PackNo', title: '打包编号' }
                        , {
                            title: '装车状态', width: 160, templet: function (d) {
                                return d.Loaded ? "已装车" : "未装车"
                            }
                        }
                    ]]
                };
                table.render(options);
            });
        }
    </script>
}
